package com.ecoolex.ying.space.ws;

import com.ecoolex.framework.common.pojo.Page;
import com.ecoolex.framework.common.pojo.Pagination;
import com.ecoolex.framework.modularize.api.auth.user.ConsumerMember;
import com.ecoolex.framework.modularize.api.auth.user.ConsumerMemberManager;
import com.ecoolex.ying.space.core.manager.UserInfoExtManager;
import com.ecoolex.ying.space.entity.UserInfoExt;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;


@Service
public class UserInfoExtServiceImpl implements UserInfoExtService {

    @Autowired
    UserInfoExtManager userInfoExtManager;

    @Autowired
    ConsumerMemberManager consumerMemberManager;

    @Override
    public UserInfoExt getByUserId(Integer userId) {
        return userInfoExtManager.getByUserId(userId);
    }

    @Override
    public ConsumerMember getConsumerMemberByUserId(Integer userId) {
        return consumerMemberManager.getByUserId(userId);
    }

    @Override
    public UserInfoExt editUserInfoExt(UserInfoExt record, String updateUser) {
        return userInfoExtManager.edit(record, updateUser);
    }

    @Override
    public Pagination<Integer> queryRecommendWatchUser(String keyword, Integer currentUserId, Page page) {
        return userInfoExtManager.queryRecommendWatchUser(keyword, currentUserId, page);
    }

}
